<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRefunds extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('refunds', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('userid')->comment('活动id');
            $table->decimal('money', 16, 2)->default(0.00)->comment('退款金额');
            $table->decimal('fee', 16,2)->default(0.00)->comment('退款服务费');
            $table->decimal('actualmoney', 16,2)->default(0.00)->comment('实际退款金额');
            $table->decimal('startbalance', 16, 2)->default(0.00)->comment('退款前余额');
            $table->decimal('lastbalance', 16, 2)->default(0.00)->comment('退款后余额');
            $table->string('note')->default('')->comment('备注');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->integer('adminid')->default(0)->comment('操作人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
